#pragma once
#include "rp2350_reg.h"
 
#define GPIO_FUNC_HSTX   0			   ///< Select HSTX as GPIO pin function
#define	GPIO_FUNC_SPI 1 		   ///< Select SPI as GPIO pin function
#define	GPIO_FUNC_UART  2 			   ///< Select UART as GPIO pin function
#define	GPIO_FUNC_I2C   3 			   ///< Select I2C as GPIO pin function
#define	GPIO_FUNC_PWM   4 			   ///< Select PWM as GPIO pin function
#define	GPIO_FUNC_SIO   5 			   ///< Select SIO as GPIO pin function
#define	GPIO_FUNC_PIO0   6 		   ///< Select PIO0 as GPIO pin function
#define	GPIO_FUNC_PIO1   7 		   ///< Select PIO1 as GPIO pin function
#define	GPIO_FUNC_PIO2   8 		   ///< Select PIO2 as GPIO pin function
#define	GPIO_FUNC_GPCK   9 		   ///< Select GPCK as GPIO pin function
#define	GPIO_FUNC_XIP_CS1  9 	   ///< Select XIP CS1 as GPIO pin function
#define	GPIO_FUNC_CORESIGHT_TRACE   9 ///< Select CORESIGHT TRACE as GPIO pin function
#define	GPIO_FUNC_USB  10 			   ///< Select USB as GPIO pin function
#define	GPIO_FUNC_UART_AUX   11 	   ///< Select UART_AUX as GPIO pin function
#define	GPIO_FUNC_NULL   0x1f 		   ///< Select NULL as GPIO pin function
 

void gpio_init(uint32_t gpio, uint32_t func);
void gpio_dir(uint32_t gpio, uint32_t out);
void gpio_pullup(uint32_t gpio, uint32_t enable);
void gpio_pulldown(uint32_t gpio, uint32_t enable);
void gpio_set(uint32_t gpio, uint32_t value);
uint32_t gpio_get(uint32_t gpio);
